package com.example.featuresdk.navigation

import androidx.navigation.NavOptionsBuilder
import com.example.featuresdk.core.AbstractFeatureSDK

interface INavigationMediator {

    /**
     * go back to previous screen in a feature or previous feature
     */
    fun back()

    /**
     * get the current active feature
     */
    fun currentFeature(): AbstractFeatureSDK

    /**
     * get the targeting feature
     */
    fun targetFeature(): AbstractFeatureSDK

    /**
     * get the feature by feature key
     */
    fun feature(featureKey: String): AbstractFeatureSDK?

    /**
     * get all features
     */
    fun features():List<AbstractFeatureSDK>

    /**
     * get all entitled features
     */
    fun entitledFeatures():List<AbstractFeatureSDK>
    /**
     * register the feature sdk in mediator
     */
    fun register(featureSDK: AbstractFeatureSDK)

    /**
     * check whether the navigation route exists or not
     */
    fun hasRoute(route: String): Boolean

    /**
     * navigate to the destination
     */
//    fun navigate(route: String, vararg params: String)

    fun navigate(route:String, vararg params: String, builder: NavOptionsBuilder.() -> Unit)
}